package org.example.ruoxing_admin_springboot3.controller.user;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.example.ruoxing_admin_springboot3.httpResponseResult.ResponseResult;
import org.example.ruoxing_admin_springboot3.service.user.UserResourcesService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
/**
 * @description 获取用户资源的controller
 * @author 莫若省
 * @createTime 2024/5/7
*/
@Tag(name = "用户登陆相关接口")
@RestController
public class UserResourcesController {
    @Resource
    private UserResourcesService userResourcesService;
    @Operation(summary = "获取当前用户的权限菜单列表的接口")
    @GetMapping("/menu_resources")
    public ResponseResult<Object> getUserMenuResources(@RequestHeader("x-access-token") String token) {
        return userResourcesService.getUserMenuResources(token);
    }

}
